package com.example;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.example.netty.NettyServer;

@SpringBootApplication
public class DemoApplication implements CommandLineRunner{
	
	@Value("${netty.port}")
	private int nettyPort;

	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}
	
	@Override
    public void run(String... args) throws Exception {
		new NettyServer().bind(nettyPort);
    }
	

}
